<?php
/**
 * 2013年8月30日10:18:30
 * author：cgp
 * 产品详情显示页面，包括票类价格
 */
if($_GET['recreate']) {
    $landid = $_GET['landid'];
}
else {
    $landid = $_SERVER['QUERY_STRING'];
}
if(!ctype_digit($landid)) {
    exit($landid . '不是合法的访问参数！');
}
if(file_exists("tpl/prods/pi_{$landid}.tpl") && !$_GET['recreate']) {
   echo file_get_contents("tpl/prods/pi_{$landid}.tpl");
}
else {
    ob_start();
    include "common/autoload.php";
    include "common/prodField.php";
    $str = "select title, tel, fax, jtype, opentime, area, address, jtzn, jdjj, bhjq, yllx, jqts, imgpath, storage,";
    $str .= "apply_did, p_type from uu_land where id=$landid";
   // echo $str;
    $GLOBALS['le']->query($str);
    $info=$GLOBALS['le']->fetch_assoc();
   // print_r($info);
    $jdjj = htmlspecialchars_decode($info['bhjq']);
    $jdjj= strip_tags($jdjj);
    $jdjj = mbsubstr($jdjj,300,"...");
    if(!trim($jdjj)) $jdjj=$info['jdjj'];
    $ptype=$info['p_type'];
    include 'common/header.html';
    include 'tpl/pi_tpl.html';
    include 'common/footer.html';
    $content = ob_get_contents();
    ob_end_clean();
    $file_name = 'tpl/prods/pi_'.$landid.'.tpl';
    file_put_contents($file_name, $content);
    echo $content;
}
?>